#ifndef QUESTIONLISTWIDGET_H
#define QUESTIONLISTWIDGET_H

#include <QWidget>
#include <QScrollArea>
#include "model/data.h"

class QuestionCard;

namespace Ui {
class QuestionListWidget;
}

class QuestionListWidget : public QWidget
{
    Q_OBJECT

public:
    explicit QuestionListWidget(QWidget *parent = nullptr);
    ~QuestionListWidget();
    void clear();
    void setCardList(const QList<model::QuestionClusterInfo>& interviews);

private slots:
    void on_btn_fliter_clicked();

private:
    void init();
    void initStyleSheet();
    void initPanel();
    void initBody();

    void showQuestion(const model::QuestionClusterInfo& interview);

    void searchQuestionClusterDone();
private:
    QScrollArea *_scrollArea = nullptr;
    QWidget *_container = nullptr;
    QList<QuestionCard*> _cards;

private:
    Ui::QuestionListWidget *ui;
};

#endif // QUESTIONLISTWIDGET_H
